package com.cssy.yd.logic.dao;


import com.cssy.yd.logic.entity.LogicWhAffstockDO;
import com.cssy.yd.logic.vo.LogicWhAffstockVO;
import com.plat.helper.SearchConditions;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;

/**
 * 数据访问对象接口
 * @since 2012-12-26
 */
public interface LogicWhAffstockDAO {

    /**
     * 插入数据
     * @param logicWhAffstockDO
     * @return 插入数据的主键
     */
    public String insertLogicWhAffstockDO(LogicWhAffstockDO logicWhAffstockDO) throws DataAccessException;

    /**
     * 统计记录数
     * @param logicWhAffstockDO
     * @return 查出的记录数
     */
    public Integer countLogicWhAffstockDOByExample(LogicWhAffstockDO logicWhAffstockDO) throws DataAccessException;

    /**
     * 更新记录
     * @param logicWhAffstockDO
     * @return 受影响的行数
     */
    public Integer updateLogicWhAffstockDO(LogicWhAffstockDO logicWhAffstockDO) throws DataAccessException;

    /**
     * 获取对象列表
     * @param logicWhAffstockDO
     * @return 对象列表
     */
    public List<LogicWhAffstockDO> findListByExample(LogicWhAffstockDO logicWhAffstockDO) throws DataAccessException;

    /**
     * 根据主键获取logicWhAffstockDO
     * @param id
     * @return logicWhAffstockDO
     */
    public LogicWhAffstockDO findLogicWhAffstockDOByPrimaryKey(String id) throws DataAccessException;

    /**
     * 删除记录
     * @param id
     * @return 受影响的行数
     */
    public Integer deleteLogicWhAffstockDOByPrimaryKey(String id) throws DataAccessException;
    /**
     * 查询
     * @param 
     * @return LogicWhAffDO
     */
    public List<LogicWhAffstockDO> find(SearchConditions scs) throws DataAccessException;
    
    /**
     * 
     * @param LogicWhAffDO
     * @return 
     */
    public Integer count(SearchConditions scs) throws DataAccessException;
    
    /**
     * 多表联合查询用于库存列表
     * @param 
     * @return List<LogicWhAffstockVO>
     */
    public List<LogicWhAffstockVO> findForWareHouseStock(SearchConditions scs) throws DataAccessException;
    
    /**
     * 统计多表联合查询数据条数用于库存列表分页
     * @param 
     * @return LogicWhAffstockVO
     */
    public Integer findForWareHouseStockCount(SearchConditions scs) throws DataAccessException;
    
    /**
     * 查询所属仓库物料库存
     * @param 
     * @return LogicWhAffstockVO
     */
    public List<LogicWhAffstockDO> findwhcode(String s) throws DataAccessException;
    /**
     * 查询库存里面可用批次
     * @param map
     * @return
     * @throws DataAccessException
     */
    public List<String> findbatch(Map map) throws DataAccessException;

    /**
     *  库存汇总
     * @param map
     * @return
     * @throws DataAccessException
     * @date 2013-9-11下午6:31:29
     * @Description:TODO
     */
    public List<LogicWhAffstockDO> stockGather(SearchConditions scs)
			throws DataAccessException;

    public Integer stockGatherCount(SearchConditions scs) throws DataAccessException;

    public List<LogicWhAffstockDO> findByBatchAll(Map<String, Object> map)
			throws DataAccessException;

    public List<LogicWhAffstockDO> findBySearchBatch(SearchConditions scs)
			throws DataAccessException;

}